package com.zyp;

import java.io.IOException;
import java.net.Socket;
import java.util.Scanner;

/**
 * @author zhangyanping
 *
 */
public class Client {

    public static void main(String[] args) {
        Socket socket;
        try {
            socket= new Socket("127.0.0.1",9001);
            Scanner scanner = new Scanner(System.in);
            String str = scanner.nextLine();
            socket.getOutputStream().write(str.getBytes());
            socket.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
